<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<h1 style="color: red"><?php echo $this->greeting; ?></h1>
<ul>
<li><a href="index.php?option=com_hello&view=hello&time=8">Greeting at 8am</a></li>
<li><a href="index.php?option=com_hello&view=hello&time=15">Greeting at 5pm</a></li>
<li><a href="index.php?option=com_hello&view=hello&time=22">Greeting at 10pm</a></li>
</ul>

<a href="index.php?option=com_hello&view=hello&task=getContact">Show contact list from Database</a>
<?if(isset($this->contacts)){ ?>
<ul type="square">
<?php 
foreach ($this->contacts as $contact){
	echo "<li>".$contact->firstName." ".$contact->lastName." - ".$contact->phone." - ".$contact->email."</li>";
}
?>
</ul>
<?
}
?>